
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Django启动 | home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="">
    <meta name="description" content="将项目所需的依赖导入.txt中pip freeze &amp;gt; requirements.txt
将项目requirements.txt文件中项目的依赖安装好pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
数据库迁移python manage.py makemigrationspython manage.py migrateDjango启动命令python manage.py runserver
">
    
        <link rel="icon" href="/favicon.ico">
    
    
        
            <link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
        
            <link rel="stylesheet" href="/css/stage.css">
        
            <link rel="stylesheet" href="/css/avatar-bg.css">
        
    
<meta name="generator" content="Hexo 4.2.0"></head>

<body>
<header id="header">
    <div class="menu">
        <i class="fa fa-bars"></i>
    </div>
    <div class="header-main">
        <h1><a href="/">home</a></h1>
    </div>
    <div id="nav">
        <div class="nav-img" id="nav-img"></div>
        <div class="sentences">
            一年之计在于春，一日之计在于晨。——萧绎
        </div>
    </div>
</header>

<div id="content-outer">
    <div id="content-inner">
        <div class="clearfix">
    <article id="post">
        <h1>Django启动</h1>
        <div class="create">
            <span>Created</span>
            
                <time datetime="2020-04-20T21:40:46.000Z">
                    2020-04-21
                </time>
            
            
        </div>
        <h1 id="将项目所需的依赖导入-txt中"><a href="#将项目所需的依赖导入-txt中" class="headerlink" title="将项目所需的依赖导入.txt中"></a>将项目所需的依赖导入.txt中</h1><h5 id="pip-freeze-gt-requirements-txt"><a href="#pip-freeze-gt-requirements-txt" class="headerlink" title="pip freeze &gt; requirements.txt"></a>pip freeze &gt; requirements.txt</h5><hr>
<h1 id="将项目requirements-txt文件中项目的依赖安装好"><a href="#将项目requirements-txt文件中项目的依赖安装好" class="headerlink" title="将项目requirements.txt文件中项目的依赖安装好"></a>将项目requirements.txt文件中项目的依赖安装好</h1><h5 id="pip-install-i-https-pypi-tuna-tsinghua-edu-cn-simple-r-requirements-txt"><a href="#pip-install-i-https-pypi-tuna-tsinghua-edu-cn-simple-r-requirements-txt" class="headerlink" title="pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt"></a>pip install -i <a href="https://pypi.tuna.tsinghua.edu.cn/simple" target="_blank" rel="noopener">https://pypi.tuna.tsinghua.edu.cn/simple</a> -r requirements.txt</h5><hr>
<h1 id="数据库迁移"><a href="#数据库迁移" class="headerlink" title="数据库迁移"></a>数据库迁移</h1><h5 id="python-manage-py-makemigrations"><a href="#python-manage-py-makemigrations" class="headerlink" title="python manage.py makemigrations"></a>python manage.py makemigrations</h5><h5 id="python-manage-py-migrate"><a href="#python-manage-py-migrate" class="headerlink" title="python manage.py migrate"></a>python manage.py migrate</h5><h1 id="Django启动命令"><a href="#Django启动命令" class="headerlink" title="Django启动命令"></a>Django启动命令</h1><h5 id="python-manage-py-runserver"><a href="#python-manage-py-runserver" class="headerlink" title="python manage.py runserver"></a>python manage.py runserver</h5><p><img src="/hugo_blog/c771720dbd691b331bcad9a158f499aa.jpg" alt="每日一图"></p>

        <div>
            <ul class="tags-category-list" itemprop="keywords"><li class="tags-category-list-item"><a class="tags-category-list-link" href="/hexo_blog/tags/python/" rel="tag">python</a></li></ul>
        </div>
        <div class="bottom-line"></div>
        
    <nav id="article-nav">
        
            <a href="/hexo_blog/2020/04/21/biaoge/" id="article-nav-newer" class="article-nav-link-wrap">
        <span class="article-nav-title">
            
                表格
            
        </span>
                <strong class="article-nav-caption">&gt;</strong>
            </a>
        
        
            <a href="/hexo_blog/2020/04/21/day002/" id="article-nav-older" class="article-nav-link-wrap">
                <strong class="article-nav-caption">&lt;</strong>
                <span class="article-nav-title">
                    
                        Hugo
                </span>
                
            </a>
        
    </nav>


        
    </article>
    <div id="toc">
        
            <h2>Table of Contents</h2>
            <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#将项目所需的依赖导入-txt中"><span class="toc-number">1.</span> <span class="toc-text">将项目所需的依赖导入.txt中</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#pip-freeze-gt-requirements-txt"><span class="toc-number">1.0.0.0.1.</span> <span class="toc-text">pip freeze &gt; requirements.txt</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#将项目requirements-txt文件中项目的依赖安装好"><span class="toc-number">2.</span> <span class="toc-text">将项目requirements.txt文件中项目的依赖安装好</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#pip-install-i-https-pypi-tuna-tsinghua-edu-cn-simple-r-requirements-txt"><span class="toc-number">2.0.0.0.1.</span> <span class="toc-text">pip install -i https:&#x2F;&#x2F;pypi.tuna.tsinghua.edu.cn&#x2F;simple -r requirements.txt</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#数据库迁移"><span class="toc-number">3.</span> <span class="toc-text">数据库迁移</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#python-manage-py-makemigrations"><span class="toc-number">3.0.0.0.1.</span> <span class="toc-text">python manage.py makemigrations</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#python-manage-py-migrate"><span class="toc-number">3.0.0.0.2.</span> <span class="toc-text">python manage.py migrate</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Django启动命令"><span class="toc-number">4.</span> <span class="toc-text">Django启动命令</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#python-manage-py-runserver"><span class="toc-number">4.0.0.0.1.</span> <span class="toc-text">python manage.py runserver</span></a></li></ol></li></ol></li></ol></li></ol></li></ol>
        
    </div>
</div>

    </div>
</div>
<footer id="footer">
    <div id="copyright">&copy; Mr.Song  2020</div>
    <div id="theme">
        Powered by <a href="http://hexo.io" target="_blank" rel="noopener">Hexo</a>. Theme by <a href="https://github.com/markyong/hexo-theme-stage" target="_blank" rel="noopener">Stage</a>
    </div>
</footer>
<script src="/lib/js/waterrippleeffect.min.js"></script>
<script src="/js/header-bg.main.js"></script>

    <script src="/lib/js/smooth-scroll.min.js"></script>
    <script src="/js/toc.main.js"></script>

</body>
</html>
